﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AsyncUploadEx.ascx.cs"
    Inherits="Shared_UserControl_AsyncUploadEx" %>
<script type="text/javascript">
    function validationFailed(sender, eventArgs) {
        if (!sender.isExtensionValid(eventArgs.get_fileName())){
            radalert(eventArgs.get_fileName() + '<br/>的扩展名不被允许，<br/>允许的为：<br/>' + sender.get_allowedFileExtensions().replace('tiff,','tiff<br/>'), 300, 50, '此扩展名不允许上传');
        }else {
            radalert('文件大小必须在10M以内！',280, 50, '文件太大了');
        }
        sender.deleteFileInputAt(0);
    }
</script>
<telerik:RadAsyncUpload ID="raUpload" runat="server" ControlObjectsVisibility="None"
    AutoAddFileInputs="False" TemporaryFolder="~/upload/temp" Width="200px" OnClientValidationFailed="validationFailed"
    AllowedFileExtensions="jpeg,jpg,gif,png,bmp,tif,tiff,txt,rar,zip,xls,doc,ppt,xlsx,docx,pptx"
    MaxFileSize="10485760">
    <Localization Cancel="取消" Remove="移除" Select="浏览" />
</telerik:RadAsyncUpload>